//
//  SPHUDUtil.m
//  Sport
//
//  Created by Cass on 2018/3/20.
//  Copyright © 2018年 Cass. All rights reserved.
//

#import "SPHUDUtil.h"

@implementation SPHUDUtil
+ (void)showHUDWithDismissTimeInterval:(NSTimeInterval)dismissTimeInterval message:(NSString *)message hudType:(SPHUDType)hudType{
    [SVProgressHUD dismissWithCompletion:^{
        [SVProgressHUD setMaximumDismissTimeInterval:dismissTimeInterval];
        switch (hudType) {
            case SPHUDTypeNormal:
                [SVProgressHUD showWithStatus:message];
                break;
            case SPHUDTypeSuccess:
                [SVProgressHUD showSuccessWithStatus:message];
                break;
            case SPHUDTypeError:
                [SVProgressHUD showErrorWithStatus:message];
                break;
            default:
                break;
        }
    }];
}
@end
